CSS

5 views
Skip to first unread message

Messi

unread,
Jul 13, 2009, 8:39:56 PM7/13/09
to asp-ajaxed
Hi,

Back again but with a question on style this time. My page is not
displaying correctly at all and I wanted to know what I am doing
incorrectly? The top (relevant part for this post) of my page is as
follows:

<!--#include virtual="../ajaxed/ajaxed.asp"-->
<!--#include virtual="../ajaxed/class_dropdown/dropdown.asp"-->
<%
set page = new AjaxedPage
page.draw()


sub drawCategoryDD()
with new Dropdown
.datasource = "SELECT DISTINCT companyname FROM
jcaccuf_sqluser.company_addresses"
.dataTextField = "companyname"
.dataValueField = "companyname"
.name = "cat"
.commonFieldText = "-- Company Name --"
.commonFieldValue = ""
.attributes = "onchange=""ajaxed.callback('articlesDD',
'articles'), doSomething()"""
.draw()
end with
end sub

sub pagePart_articlesDD()
with new Dropdown
set .datasource = db.getUnlockedRS( _
"SELECT * FROM jcaccuf_sqluser.company_addresses WHERE
companyname = '{0}'", _
page.RF("cat") _
)
.dataTextField = "company_address"
.dataValueField = "company_address"
.disabled = page.RFT("cat") = ""
.name = "article"

.draw()
end with
end sub

sub main()
%>

<script>
function loadergif() {
$('loading').show();
ajaxed.callback('do', function(r) {
alert('done!');
}, null, function(t) {
$('loading').hide();
})
}
</script>
<script type="text/javascript" src="scripts/showhidelayer.js"></
script>
<script src="../SpryAssets/SpryValidationPassword.js" type="text/
javascript"></script>
<script src="../SpryAssets/SpryValidationSelect.js" type="text/
javascript"></script>
<script src="../SpryAssets/SpryValidationTextField.js" type="text/
javascript"></script>
<script src="../ajaxed/prototypejs/prototype.js" type="text/javascript
language="javascript="javascript"" " ></script>
<script type="text/javascript" src="../ajaxed/class_ajaxedPage/
ajaxed.js"></script>
<script type="text/javascript">
ajaxed.prototype.debug = false;
ajaxed.prototype.indicator.innerHTML = '';
</script>
<link href="css/indexcss.css" rel="stylesheet" type="text/css">
<link href="../SpryAssets/SpryValidationSelect.css" rel="stylesheet"
type="text/css">
<link href="../SpryAssets/SpryValidationTextField.css"
rel="stylesheet" type="text/css">
<link href="../SpryAssets/SpryValidationPassword.css" rel="stylesheet"
type="text/css">
</head>
<body onload="MM_showHideLayers('sprytextfield4','','hide')">


Any ideas?

Thanks

Alek

Messi

unread,
Jul 13, 2009, 9:03:28 PM7/13/09
to asp-ajaxed
ignore this error...has been corrected but no change...

<script src="../ajaxed/prototypejs/prototype.js" type="text/
javascript
language="javascript="javascript"" " ></script>

Thanks

Messi

unread,
Jul 13, 2009, 10:31:26 PM7/13/09
to asp-ajaxed
In fact scrap the whole post something unrelated to Ajaxed is going...

Bill A.

unread,
Jul 14, 2009, 11:38:06 AM7/14/09
to asp-ajaxed
Hi Messi,
I don't know exactly what HTML the asp is rendering, but most likely
the problem is being caused by putting <script> and <link> tags in the
main() function. Those belong in the header() function like so

sub header()
page.loadCSSFile "/styles/yourStyleSheet.css","screen"
page.loadJSFile "/ajaxed/class_ajaxedPage/yourJavaScript.js
end sub

Ensure that your header.asp file has <% lib.exec "header", empty %>
between the <head> tags like so:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /
>
<title><%= title %></title>
<% 'if there is a header sub, then it will be called. e.g. for
custom styles, etc. %>
<% ajaxedHeader(array()) %>
<% lib.exec "header", empty %>
</head>

Messi

unread,
Jul 18, 2009, 1:33:06 AM7/18/09
to asp-ajaxed
Hi Bill,

Sorry for the delayed response...

You were correct, the script tags and links did cause a layout problem
but so did the fact that I was running the new Windows 7 RC plus IE8
to view the page...even after correcting the header issue (as you
suggested) the page still would not render simple list and div tags
correctly (your suggestion cleaned up the majority of issues). The
same page viewed in Vista + IE8 rendered correctly. I am sure MS will
iron out the bugs for the final Win7 release.

Thanks for your help,

Alek
> > > > Alek- Hide quoted text -
>
> - Show quoted text -

Bill A.

unread,
Jul 20, 2009, 11:16:18 AM7/20/09
to asp-ajaxed
You may be running into another issue, where ie7 and 8 default to
quirks mode if your doctype isn't strict. The solution is to use the
new ie meta tag that forces ie7 and ie8 emulation.

http://blogs.msdn.com/ie/archive/2008/06/10/introducing-ie-emulateie7.aspx

Drop this into your header if your doctype is XHTML:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

or this if your doctype is HTML
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
Reply all
Reply to author
Forward
0 new messages